﻿package bdz.dms.events {
	import flash.events.Event;
	
	/**
	* ...
	* @author Default
	*/
	public class DMSEvent extends Event {
		
		public static const PROCESSING_START:String = "process_start";
		public static const PROCESSING_END:String = "process_end";
		public static const PROCESSING_ERROR:String = "processing_error";
		
		public static const LOGIN_SUCCESSFUL:String = "login_successful";
		public static const LOGIN_FAILED:String = "login_failed";
		
		public static const SECTION_LOADED:String = "section_loaded";
		public static const SECTION_REMOVED:String = "section_removed";
		public static const SECTION_MODIFIED:String = "section_modified";
		public static const SECTION_ADDED:String = "section_added";
		public static const SECTION_REARRANGED:String = "section_rearranged";
		public static const SECTION_CONTENT_LOADED:String = "section_and_content_loaded";
		
		public static const USER_LOADED:String  = "user_loaded";
		public static const USER_REMOVED:String = "user_removed";
		public static const USER_MODIFIED:String = "user_modified";
		public static const USER_ADDED:String = "user_added";
		
		public static const CONTENT_REMOVED:String = "content_removed";
		public static const CONTENT_LOADED:String = "content_loaded";
		public static const CONTENT_MODIFIED:String = "content_modified";
		public static const CONTENT_ADDED:String = "content_added";
		public static const CONTENT_REARRANGED:String = "content_rearranged";
		
		public static const TEMPLATE_ADDED:String = "template_added";
		public static const TEMPLATE_LOADED:String = "template_loaded";
		public static const TEMPLATE_MODIFIED:String = "template_modified";
		public static const TEMPLATE_REMOVED:String = "template_removed";
		public static const TEMPLATE_APPLIED:String = "template_applied";
		
		public static const APPLIED_TEMPLATES:String = "applied_templates";
		public static const FILE_UPLOADED:String = "file_uploaded";
		public static const PASSWORD_RESET:String = "password_changed";
		public static const EMAIL_SENT:String = "email_sent";
		public static const SERVER_VARS:String = "server_vars";
		
		public var data:*;
		function DMSEvent(type:String, info:*, bubbles:Boolean = false, cancelable:Boolean = false) {
			super(type, bubbles, cancelable);
			data = info;
		}
		override public function clone():Event {
			return new DMSEvent(type, data);
		}
	}
	
}